07. Test the Instance

Test the Instance

Make sure everything is working properly by verifying that the instance can run a Keras notebook.

On the EC2 instance
  • Clone a GitHub repository
    • git clone https://github.com/udacity/aind2-cnn.git
  • Enter the repo directory
    • cd aind2-cnn
  • Install the requirements
    • sudo python3 -m pip install -r requirements/requirements-gpu.txt
  • Start Jupyter notebook
    • jupyter notebook --ip=0.0.0.0 --no-browser
From your local machine
  • You will need the token generated by your jupyter notebook to access it. On your instance terminal, there will be the following line:
    Copy/paste this URL into your browser when you connect for the first time, to login with a token:. Copy everything starting with the :8888/?token=.
  • Access the Jupyter notebook index from your web browser by visiting: X.X.X.X:8888/?token=... (where X.X.X.X is the IP address of your EC2 instance and everything starting with :8888/?token= is what you just copied).
  • Click on "mnist_mlp" to enter the folder, and select the "mnist_mlp.ipynb" notebook.
  • Run each cell in the notebook.

NOTE: Windows users may prefer connecting via the GUI utility PuTTY, by following these instructions.

From this point on, AWS will charge you for a running an EC2 instance. You can find the details on the EC2 On-Demand Pricing page.

Most importantly, remember to “stop” (i.e. shutdown) your instances when you are not using them. Otherwise, your instances might run for a day or a week or a month without you remembering, and you’ll wind up with a large bill!

AWS charges primarily for running instances, so most of the charges will cease once you stop the instance. However, there are smaller storage charges that continue to accrue until you “terminate” (i.e. delete) the instance.